popover: Correctly substract arrow height when measuring popover widget
authorYubao Liu <yubao.liu@gmail.com>
Sat, 16 Jul 2022 16:12:39 +0000 (00:12 +0800)
committerYubao Liu <yubao.liu@gmail.com>
Sat, 16 Jul 2022 16:29:42 +0000 (00:29 +0800)
commit50a8cbc0da3118640cf0525d30f94c54e68b73d2
treecfda7c5e5689124803afe7b6a5105f4e956a414a
parent188cb49b44bc7426290fc8c0c8fd68de37b7423b
popover: Correctly substract arrow height when measuring popover widget

For default popover arrow position and default height-for-width layout mode,
natural_width is calculated first with for_size=-1 and orientation=HORIZONTAL,
at the end of gtk_popover_measure() natural_width  won't be added with tail_height.

Then to measure with for_size=natural_width and orientation=VERTICAL, obviously
for_size shouldn't be substract with tail_height.

The wrong logic will force content in popover gets less width and then text labels
in popover may get wrapped unnecessarily.
gtk/gtkpopover.c